package thread;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ThreadSleepTest {

	public static void main(String[] args) throws InterruptedException {
		Date endDate = new Date(System.currentTimeMillis() + 10000);
        long end = endDate.getTime();
        while(true){
        	System.out.println(new SimpleDateFormat("mm:ss").format(end));
        	end = end - 1000;
        	Thread.sleep(1000);
        	if(end < (endDate.getTime() - 10000)){
        		break;
        	}
        }
	}

}
